Method and terminal for acquire panoramic image

ABSTRACT

A method includes: after a panorama shooting instruction triggered by a user is acquired, shooting a first image, and acquiring a shooting parameter of the first image; determining move guiding information according to a preset move guiding policy, and displaying the move guiding information on a terminal, so as to instruct the user to move the terminal according to the move guiding information; shooting a preset quantity of images according to the shooting parameter of the first image after it is detected that the terminal moves, where the preset quantity of images are background images on both the left and right sides of a background corresponding to the first image; and performing, by using the first image as a center and by using a preset splicing scheme, seamless splicing on the first image and the preset quantity of images, to obtain a panoramic image.

CROSS-REFERENCE TO RELATED APPLICATIONS

This application a continuation of U.S. patent application Ser. No.16/379,001, filed on Apr. 9, 2019, now U.S. Pat. No. 10,771,686, whichis a continuation of U.S. patent application Ser. No. 14/984,316, filedon Dec. 30, 2015, now U.S. Pat. No. 10,277,804, which is a continuationof International Application No. PCT/CN2013/089411, filed on Dec. 13,2013. All of the aforementioned patent applications are herebyincorporated by reference in their entireties.

TECHNICAL FIELD

Embodiments of the present invention relate to the field of imageprocessing technologies, and in particular, to a method and terminal foracquiring a panoramic image.

BACKGROUND

A rear-facing panorama shooting mode is a shooting mode commonly used inexisting smartphones. The rear-facing panorama shooting mode is to movea shooting terminal in a direction to shoot multiple photos, and splicethe multiple photos into an image with a larger visual angle.

When a single person goes out for traveling and wants to take a photowith a scene, generally, the person has to ask another person for help,which is inconvenient. If the person wants to take a selfie, generally,a photo that includes only the face of the person can be shot, and it isdifficult to shoot a photo that includes an entire background of ascene.

When multiple persons get together and want to take a group photo, aphoto that includes all persons cannot be shot even by using a selfiemode, which makes a trouble for users.

The inventor of the present invention finds that there is nofront-facing panorama shooting mode in the prior art, even if arear-facing panoramic mode in the prior art is applied to a front-facingshooting mode, a shooting terminal is moved in only one direction duringshooting, so as to shoot multiple photos to obtain a photo with a largevisual angle. In this way, when shooting is started from a person, ascene on only one side of the person can be shot; when shooting isstarted from a scene, a person cannot be highlighted, thereby reducing ashooting effect.

SUMMARY

Embodiments of the present invention provide a method for acquiring apanoramic image, which can highlight an image at a central positionduring panorama shooting, thereby improving an overall effect of thepanoramic image. Embodiments of the present invention further provide acorresponding terminal.

According to a first aspect, the present invention provides a method foracquiring a panoramic image, including:

after a panorama shooting instruction triggered by a user is acquired,shooting a first image, and acquiring a shooting parameter of the firstimage;

determining move guiding information according to a preset move guidingpolicy, and displaying the move guiding information on a terminal, so asto instruct the user to move the terminal according to the move guidinginformation;

shooting a preset quantity of images according to the shooting parameterof the first image after it is detected that the terminal moves, wherethe preset quantity of images are background images on both the left andright sides of a background corresponding to the first image; and

performing, by using the first image as a center and by using a presetsplicing scheme, seamless splicing on the first image and the presetquantity of images, to obtain a panoramic image.

With reference to the first aspect, in a first possible implementationmanner, the determining move guiding information according to a presetmove guiding policy, and displaying the move guiding information on aterminal, so as to instruct the user moves the terminal according to themove guiding information includes:

determining a shooting position of a next image according to the presetmove guiding policy, and displaying the shooting position of the nextimage on the terminal; and

correspondingly, the shooting a preset quantity of images according tothe shooting parameter of the first image after it is detected that theterminal moves, where the preset quantity of images are backgroundimages on both the left and right sides of a background corresponding tothe first image includes:

shooting the next image according to the shooting parameter of the firstimage after the terminal moves to the shooting position of the nextimage, and

repeating the foregoing determining, displaying and shooting steps,until the preset quantity of images are shot.

With reference to the first possible implementation manner of the firstaspect, in a second possible implementation manner, after the displayingthe shooting position of the next image on the terminal, the methodfurther includes:

acquiring and displaying a position of the terminal in real time whenthe terminal is moving; and

correspondingly, the shooting the next image according to the shootingparameter of the first image after the terminal moves to the shootingposition of the next image includes:

shooting the next image according to the shooting parameter of the firstimage when the displayed position of the terminal is the same as theshooting position of the next image.

With reference to the second possible implementation manner of the firstaspect, in a third possible implementation manner, the acquiring anddisplaying a position of the terminal in real time when the terminal ismoving includes:

when the terminal is moving, acquiring and displaying, in real time, aposition of the terminal in a moving process by detecting a relativemotion of images of adjacent frames, so as to instruct the user to movethe terminal to a position for acquiring the next image.

With reference to the second or third possible implementation manner ofthe first aspect, in a fourth possible implementation manner, after theshooting a first image, and acquiring a shooting parameter of the firstimage, the method further includes:

performing central position calibration at an interval of preset framesof images, where the central position calibration is to compare acurrent preview image with the first image, and when a matchingsimilarity between the current preview image and the first image ishigher than a preset threshold, determine that the position of theterminal returns to a position of the terminal at which the first imageis shot, so as to restart, when the position of the terminal fails to bedetected, shooting according to the position at which the first image isshot.

With reference to any one of the first to fourth possible implementationmanners of the first aspect, in a fifth possible implementation manner,before the shooting a first image, and acquiring a shooting parameter ofthe first image, the method further includes:

locking automatic white balance AWB control and automatic exposure AEcontrol, so that shooting parameters of the preset quantity of shotimages keep consistent with the shooting parameter of the first image.

With reference to any one of the first to fifth possible implementationmanners of the first aspect, in a sixth possible implementation manner,the performing, by using the first image as a center and by using apreset splicing scheme, seamless splicing on the first image and thepreset quantity of images, to obtain a panoramic image includes:

detecting positions of person images in both the first image and thepreset quantity of images; and

when image splicing is performed by using the preset splicing scheme,performing splicing from a position of a non-person image in each image.

According to a second aspect, the present invention provides a terminal,including:

an acquiring unit, configured to acquire a panorama shooting instructiontriggered by a user;

a shooting unit, configured to shoot a first image after the acquiringunit acquires the panorama shooting instruction triggered by the user;where

the acquiring unit is further configured to acquire a shooting parameterof the first image when the shooting unit shoots the first image;

a determining unit, configured to determine move guiding informationaccording to a preset move guiding policy after the acquiring unitacquires the first image;

a display unit, configured to display, on the terminal, the move guidinginformation determined by the determining unit, so as to instruct theuser to move the terminal according to the move guiding information;

a detecting unit, configured to detect a moving status of the terminal;where

the shooting unit is further configured to shoot a preset quantity ofimages according to the shooting parameter of the first image after thedetecting unit detects that the terminal moves, where the presetquantity of images are background images on both the left and rightsides of a background corresponding to the first image; and

a splicing unit, configured to perform, by using the first image as acenter and by using a preset splicing scheme, seamless splicing on thefirst image and the preset quantity of images that are shot by theshooting unit, to obtain a panoramic image.

With reference to the second aspect, in a first possible implementationmanner,

the determining unit is configured to determine a shooting position of anext image according to the preset move guiding policy;

the display unit is configured to display the shooting position of thenext image on the terminal;

the detecting unit is configured to detect whether the terminal moves tothe shooting position that is of the next image and displayed by thedisplay unit;

the shooting unit is configured to shoot the next image according to theshooting parameter of the first image after the terminal moves to theshooting position of the next image; and

the determining unit, the display unit, the detecting unit, and theshooting unit repeat the foregoing determining, displaying and shootingsteps, until the preset quantity of images are shot.

With reference to the first possible implementation manner of the secondaspect, in a second possible implementation manner,

the acquiring unit is further configured to acquire a position of theterminal in real time when the terminal is moving;

the display unit is further configured to display, in real time, theposition of the terminal that is acquired by the acquiring unit;

the detecting unit is configured to detect whether the position of theterminal that is displayed by the display unit is the same as theshooting position of the next image; and

the shooting unit is configured to shoot the next image according to theshooting parameter of the first image when the position of the terminalthat is displayed by the display unit is the same as the shootingposition of the next image.

With reference to the second possible implementation manner of thesecond aspect, in a third possible implementation manner,

the acquiring unit is configured to: when the terminal is moving,acquire, in real time, a position of the terminal in a moving process bydetecting a relative motion of images of adjacent frames, so as toinstruct the user to move the terminal to a position for acquiring thenext image; and

the display unit is configured to display the position of the terminalin the moving process that is acquired by the acquiring unit.

With reference to the second or third possible implementation manner ofthe second aspect, in a fourth possible implementation manner,

the terminal further includes:

a calibration unit, configured to: after the shooting unit shoots thefirst image, perform central position calibration at an interval ofpreset frames of images, where the central position calibration is tocompare a current preview image with the first image, and when amatching similarity between the current preview image and the firstimage is higher than a preset threshold, determine that the position ofthe terminal returns to a position of the terminal at which the firstimage is shot, so as to restart, when the position of the terminal failsto be detected, shooting according to the position at which the firstimage is shot.

With reference to the second aspect and any one of the first to fourthpossible implementation manners of the second aspect, in a fifthpossible implementation manner,

the terminal further includes:

a locking unit, configured to, before the shooting unit shoots the firstimage, lock automatic white balance AWB control and automatic exposureAE control, so that shooting parameters of the preset quantity of shotimages keep consistent with the shooting parameter of the first image.

With reference to the second aspect and any one of the first to fifthpossible implementation manners of the second aspect, in a sixthpossible implementation manner,

the splicing unit includes:

a detecting subunit, configured to detect positions of person images inboth the first image and the preset quantity of images; and

a splicing subunit, configured to: when image splicing is performed byusing the preset splicing scheme, perform splicing from a position,detected by the detecting subunit, of a non-person image in each image.

According to a third aspect, the present invention provides a terminal,where the terminal includes a receiver, a transmitter, a camera, aprocessor and a memory;

the camera is configured to shoot an image;

the receiver is configured to receive a panorama shooting instructiontriggered by a user; and

the processor is configured to:

after the panorama shooting instruction triggered by the user isacquired, shoot a first image, and acquiring a shooting parameter of thefirst image;

determine move guiding information according to a preset move guidingpolicy, and display the move guiding information on the terminal, so asto instruct the user to move the terminal according to the move guidinginformation;

shoot a preset quantity of images according to the shooting parameter ofthe first image after it is detected that the terminal moves, where thepreset quantity of images are background images on both the left andright sides of a background corresponding to the first image; and

perform, by using the first image as a center and by using a presetsplicing scheme, seamless splicing on the first image and the presetquantity of images, to obtain a panoramic image.

According to the embodiments of the present invention, after a panoramashooting instruction triggered by a user is acquired, a first image isshot, and a shooting parameter of the first image is acquired; moveguiding information is determined according to a preset move guidingpolicy, and the move guiding information is displayed on a terminal, soas to instruct the user to move the terminal according to the moveguiding information. After it is detected that the terminal moves, apreset quantity of images are shot according to the shooting parameterof the first image, where the preset quantity of images are backgroundimages on both the left and right sides of a background corresponding tothe first image, and seamless splicing is performed, by using the firstimage as a center and by using a preset splicing scheme, on the firstimage and the preset quantity of images, to obtain a panoramic image.Compared with the prior art in which an image at a central positioncannot be highlighted during panorama shooting, in the method providedin the embodiments of the present invention, an image at a centralposition can be highlighted during panorama shooting, thereby improvingan overall effect of the panoramic image.

BRIEF DESCRIPTION OF DRAWINGS

To describe the technical solutions in the embodiments of the presentinvention more clearly, the following briefly introduces theaccompanying drawings required for describing the embodiments.Apparently, the accompanying drawings in the following description showmerely some embodiments of the present invention, and a person skilledin the art may still derive other drawings from these accompanyingdrawings without creative efforts.

FIG. 1 is a schematic diagram of a method for acquiring a panoramicimage according to an embodiment of the present invention;

FIG. 2 is a schematic diagram of a method for acquiring a panoramicimage according to another embodiment of the present invention;

FIG. 3A to FIG. 3C are schematic diagrams of a method for acquiring apanoramic image according to another embodiment of the presentinvention;

FIG. 4 is a schematic diagram of a terminal according to an embodimentof the present invention;

FIG. 5 is a schematic diagram of a terminal according to anotherembodiment of the present invention;

FIG. 6 is a schematic diagram of a terminal according to anotherembodiment of the present invention;

FIG. 7 is a schematic diagram of a terminal according to anotherembodiment of the present invention;

FIG. 8 is a schematic diagram of a terminal according to anotherembodiment of the present invention; and

FIG. 9 is a schematic diagram of a terminal according to anotherembodiment of the present invention.

DESCRIPTION OF EMBODIMENTS

Embodiments of the present invention provide a method for acquiring apanoramic image, which can highlight an image at a central positionduring panorama shooting, thereby improving an overall effect of thepanoramic image. Embodiments of the present invention further provide acorresponding terminal. Detailed descriptions are made in the following.

The following clearly describes the technical solutions in theembodiments of the present invention with reference to the accompanyingdrawings in the embodiments of the present invention. Apparently, thedescribed embodiments are merely some but not all of the embodiments ofthe present invention. All other embodiments obtained by a personskilled in the art based on the embodiments of the present inventionwithout creative efforts shall fall within the protection scope of thepresent invention.

Solutions to acquiring a panoramic image provided in the embodiments ofthe present invention are applicable to a rear-facing shooting mode anda front-facing shooting mode, and in particular, to the front-facingshooting mode.

Referring to FIG. 1, a method for acquiring a panoramic image providedin an embodiment of the present invention includes the following steps:

101. After a panorama shooting instruction triggered by a user isacquired, shoot a first image, and acquire a shooting parameter of thefirst image.

When panorama shooting is required, a terminal shoots a first imageafter a panorama shooting instruction triggered by a user is acquired,and simultaneously acquires a shooting parameter of the first image inorder to ensure that parameters such as exposure control and whitebalance control of other subsequent images are the same as those of thefirst image.

102. Determine move guiding information according to a preset moveguiding policy, and display the move guiding information on a terminal,so as to instruct the user to move the terminal according to the moveguiding information.

The preset move guiding policy in this embodiment of the presentinvention may be: to first move or rotate toward the left side of aninitial position of the terminal, and then move or rotate toward theright side of the initial position of the terminal.

The move guiding information may be icon guiding information, or may betext guiding information. A position to which a terminal should move maybe displayed on the terminal.

103. Shoot a preset quantity of images according to the shootingparameter of the first image after it is detected that the terminalmoves, where the preset quantity of images are background images on boththe left and right sides of a background corresponding to the firstimage.

During front-facing panorama shooting, when the terminal rotates to theleft side of the initial position, an image on the right side of thebackground of the first image may be shot, and when the terminal rotatesto the right side of the initial position, an image on the left side ofthe background of the first image may be shot.

The preset quantity may be 4; when rotating to the left side of theinitial position, the terminal shoots two images; and when rotating tothe right side of the initial position, the terminal shoots two images.Alternatively, the preset quantity may be 2, one image on the left sideand the other on the right side. The preset quantity is not limited, andmay be set as required.

For example, a user wants to take a selfie, the user holds a mobilephone to focus on the user to shoot an image, and this image is labeled“C”. The user rotates the mobile phone toward the left side of aposition at which the image C is shot, to successively shoot two images:an image B and an image A; and then rotates the mobile phone toward theright side of the position at which the image C is shot, to shoot twoimages: an image D and an image E. In this way, five images areacquired, that is, the image A to the image E.

104. Perform, by using the first image as a center and by using a presetsplicing scheme, seamless splicing on the first image and the presetquantity of images, to obtain a panoramic image.

An image splicing technology is to splice multiple images into an imagewith a large visual angle. The example in step 103 is still used. Theimage A to the image E are spliced according to a sequence of A, B, C,D, and E or a sequence of E, D, C, B, and A, so that a panoramic imagein which the image C is in a center may be obtained.

The image splicing solution in this embodiment of the present inventionbelongs to the prior art. For example, splicing may be performed byusing a method such as a template matching method, an adjacency columnratio matching method, a fast grid-based matching method, or a localentropy difference-based image matching method.

According to this embodiment of the present invention, after a panoramashooting instruction triggered by a user is acquired, a first image isshot, and a shooting parameter of the first image is acquired, moveguiding information is determined according to a preset move guidingpolicy, and the move guiding information is displayed on a terminal, soas to instruct the user to move the terminal according to the moveguiding information. After it is detected that the terminal moves, apreset quantity of images are shot according to the shooting parameterof the first image, where the preset quantity of images are backgroundimages on both the left and right sides of a background corresponding tothe first image, and seamless splicing is performed, by using the firstimage as a center and by using a preset splicing scheme, on the firstimage and the preset quantity of images, to obtain a panoramic image.Compared with the prior art in which an image at a central positioncannot be highlighted during panorama shooting, in the method providedin this embodiment of the present invention, an image can be highlightedat a central position during panorama shooting, thereby improving anoverall effect of the panoramic image.

Optionally, based on the embodiment corresponding to FIG. 1 in theforegoing, in another embodiment of a method for acquiring a panoramicimage provided in an embodiment of the present invention, thedetermining move guiding information according to a preset move guidingpolicy, and displaying the move guiding information on a terminal, so asto instruct the user to move the terminal according to the move guidinginformation may include:

determining a shooting position of a next image according to the presetmove guiding policy, and displaying the shooting position of the nextimage on the terminal;

correspondingly, the shooting a preset quantity of images according tothe shooting parameter of the first image after it is detected that theterminal moves, where the preset quantity of images are backgroundimages on both the left and right sides of a background corresponding tothe first image includes:

shooting the next image according to the shooting parameter of the firstimage after the terminal moves to the shooting position of the nextimage; and

repeating the foregoing determining, displaying and shooting steps,until the preset quantity of images are shot.

In this embodiment of the present invention, if the preset move guidingpolicy instructs to first move or rotate toward the left side of theinitial position, the terminal determines that the shooting position ofthe next image is on the left side of the initial position, and displaysthe shooting position of the next image in a display interface of theterminal.

The user may move or rotate the terminal according to a prompt in thedisplay interface of the terminal, and when the terminal rotates to theshooting position of the next image, the terminal automatically shootsthe next image. In this way, each time when an image is shot, a shootingposition of a next image is displayed in the display interface of theterminal, and images can be shot until the preset quantity of backgroundimages on both the left and right sides of the background correspondingto the first image are shot, as long as the user moves or rotates theterminal according to the prompt in the display interface of theterminal.

For example, referring to FIG. 2, a user takes a selfie in a panoramashooting mode, and the user holds a mobile phone to focus the user toshoot a first image. The mobile phone instructs, according to a presetmove guiding policy, to rotate the mobile phone leftward, so as tocomplete shooting a second image. In addition, a small ball and a smallcircle are displayed in a display interface of the mobile phone, wherean arrow points from the small circle to the small ball, the small ballis used to indicate a shooting position of a next image, and the smallcircle is used to indicate an initial position of the mobile phone atwhich the first image is shot. A direction of the arrow indicates thatthe mobile phone needs to rotate leftward. In this way, the user canrotate the mobile phone leftward according to a prompt in the displayinterface. When the small circle moves to a position of the small ball,the small circle overlaps with the small ball, and the mobile phoneautomatically shoots the second image. After the second image is shot,the mobile phone further displays a shooting position of a third image.The user needs only to rotate the mobile phone according to a prompt inthe display interface; then, shooting of a required image can becompleted.

Referring to FIG. 3A, the circle shown in FIG. 3A indicates the body ofa user who uses a terminal to take a selfie, the vertical line indicatesan arm of the user, and the horizontal line indicates the terminal. FIG.3A is a schematic diagram of a relationship between the terminal and theuser when the user shoots a first image. After the first image is shot,the terminal needs to rotate leftward to shoot a second image; then, theuser may rotate the terminal leftward, but the arm does not need tomove. As shown in FIG. 3B, after the terminal rotates to a shootingposition of the second image, the second image may be shot. After thesecond image is shot, the terminal needs to rotate rightward to shoot athird image; then, the user may rotate the terminal the rightward. Whenrotating to a shooting position, shown in FIG. 3C, of the third image,the terminal may shoot the third image.

Optionally, based on the optional embodiment corresponding to FIG. 1 inthe foregoing, in another embodiment of a method for acquiring apanoramic image provided in an embodiment of the present invention,after the displaying the shooting position of the next image on theterminal, the method may further include:

acquiring and displaying a position of the terminal in real time whenthe terminal is moving; and

correspondingly, the shooting the next image according to the shootingparameter of the first image after the terminal moves to the shootingposition of the next image may include:

shooting the next image according to the shooting parameter of the firstimage when the displayed position of the terminal is the same as theshooting position of the next image.

In this embodiment of the present invention, referring to FIG. 2, whenthe user rotates the mobile phone, the mobile phone acquires anddisplays a position of the mobile phone in a rotating process in realtime, that is, a position change of the small circle is displayed, inreal time, on the mobile phone in a rotating process of the mobilephone, so as to help the user determine how much the mobile phone shouldbe rotated to enable the small circle to overlap with the small ball.When positions of the small circle and the small ball overlap with eachother, the mobile phone automatically acquires a next image.

Optionally, based on the optional embodiment corresponding to FIG. 1 inthe foregoing, in another embodiment of a method for acquiring apanoramic image provided in an embodiment of the present invention, theacquiring and displaying a position of the terminal in real time whenthe terminal is moving may include:

when the terminal is moving, acquiring and displaying, in real time, aposition of the terminal in a moving process by detecting a relativemotion of images of adjacent frames, so as to instruct the user to movethe terminal to a position for acquiring the next image.

In this embodiment of the present invention, after the first image isshot, the mobile phone needs to rotate to a position of a next image toshot the next image. Actually, from the time when a shooting mode isenabled, the user cannot capture an image according to a frame rate. Forexample, when the frame rate is 30 frames/second, the terminal capturesone frame at an interval of 1/30 seconds, and the terminal candetermine, according to a difference between two images of adjacentframes, how much the terminal moves, to determine a position of theterminal in a moving process, and display the determined position on theterminal, so as to instruct the user to move the terminal to theshooting position of the next image.

Optionally, based on the optional embodiment corresponding to FIG. 1 inthe foregoing, in another embodiment of a method for acquiring apanoramic image provided in an embodiment of the present invention,after the shooting a first image, and acquiring a shooting parameter ofthe first image, the method may further include:

performing central position calibration at an interval of preset framesof images, where the central position calibration is to compare acurrent preview image with the first image, and when a matchingsimilarity between the current preview image and the first image ishigher than a preset threshold, determine that the position of theterminal returns to a position of the terminal at which the first imageis shot, so as to restart, when the position of the terminal fails to bedetected, shooting according to the position at which the first image isshot.

In this embodiment of the present invention, the preset frames of imagesmay be 10 frames, that is, central position calibration is performed atan interval of 10 frames. An objective of central position calibrationis to: when the terminal fails to detect a position of the terminal,find a position at which the first image is shot. In this way, shootingcan be restarted.

The preset threshold may be 80% or 90%, or may be another value becausethe first image is generally shot by focusing on the face of a person.When the similarity between the preview image and the first image ishigher than the preset threshold, it may be determined that the terminalreturns to the position at which the first image is shot.

Optionally, based on the embodiment corresponding to FIG. 1 or anyoptional embodiment corresponding to FIG. 1 in the foregoing, in anotherembodiment of a method for acquiring a panoramic image provided in anembodiment of the present invention,

before the shooting a first image, and acquiring a shooting parameter ofthe first image, the method may further include:

locking automatic white balance (Automatic White Balance, AWB) controland automatic exposure (Automatic Exposure, AE) control, so thatshooting parameters of the preset quantity of shot images keepconsistent with the shooting parameter of the first image.

To collect multiple images during panorama shooting, an exposure settingand a white balance setting need to be locked according to exposure andwhite balance settings corresponding to the first image. By firstshooting an image in the middle, it can be ensured that the lockedexposure and white balance settings better render the face of a person.If an image is shot on the left side first, generally, luminance of anoutdoor background is remarkably greater than luminance of the face of aperson, which causes that the face of the person is too dark.

Optionally, based on the embodiment corresponding to FIG. 1 or anyoptional embodiment corresponding to FIG. 1 in the foregoing, in anotherembodiment of a method for acquiring a panoramic image provided in anembodiment of the present invention, the performing, by using the firstimage as a center and by using a preset splicing scheme, seamlesssplicing on the first image and the preset quantity of images, to obtaina panoramic image may include:

detecting positions of person images in both the first image and thepreset quantity of images; and

when image splicing is performed by using the preset splicing scheme,performing splicing from a position of a non-person image in each image.

In this embodiment of the present invention, to ensure a splicingeffect, a person image should be maximally prevented from being spliced,image points with a low gradient in an image are selected, and an areain which the face of a person is located should be maximally avoided.

During image splicing, a characteristic point in each image may beextracted, where a scale-invariant feature transform (Scale-invariantfeature transform, SIFT) extracting method, a characteristic pointextracting method, or an angular point extracting method may be used toextract a characteristic point. The SIFT extracting method and theangular point extracting method belong to the well-known technology inthe field of image processing, and details are not described in thisembodiment.

After characteristic points are extracted, characteristic pointsextracted from different images are compared, and characteristic pointsrepresenting a same image character are matched. SIFT characteristicpoint matching may be used, or image block matching may be used. TheSIFT characteristic point matching and the image block matching belongto the well-known technology in the field of image processing, anddetails are not described in this embodiment.

After the characteristic points are matched, a characteristic point pairis selected, a characteristic point pair representing same imagetransform is retained, a characteristic point pair representing otherimage transform is removed, and a random sample consensus (Random SampleConsensus, RANSAC) algorithm may be used. A transform matrix between twoimages may also be calculated according to the selected characteristicpoint pair by transforming a matrix.

After an image is rotated according to a transform matrix, a position ofthe face of a person is detected, so as to prevent an area in which theface of the person is located to select the characteristic point pairfrom being spliced. An iterative algorithm ADABOOST algorithm may beused, or a FLOATBOOST algorithm may be used. These algorithms belong tothe well-known technology in the field, and details are not describedherein.

A splicing seam between two images is searched for, and the images areseamed. The images may be seamed by using a seam carving technology. Theseam carving technology belongs to the well-known technology, anddetails are not described herein. During selection of the splicing seam,image points with a low gradient in an image are selected, and an areain which the face of a person is located should be maximally avoided.

Referring to FIG. 4, a terminal provided in an embodiment of the presentinvention includes:

an acquiring unit 201, configured to acquire a panorama shootinginstruction triggered by a user;

a shooting unit 202, configured to shoot a first image after theacquiring unit 201 acquires the panorama shooting instruction triggeredby the user; where

the acquiring unit 201 is further configured to acquire a shootingparameter of the first image when the shooting unit shoots the firstimage;

a determining unit 203, configured to determine move guiding informationaccording to a preset move guiding policy after the acquiring unit 201acquires the first image;

a display unit 204, configured to display, on the terminal, the moveguiding information determined by the determining unit 203, so as toinstruct the user to move the terminal according to the move guidinginformation;

a detecting unit 205, configured to detect a moving status of theterminal after the display unit 204 displays the move guidinginformation; where

the shooting unit 202 is further configured to shoot a preset quantityof images according to the shooting parameter of the first image afterthe detecting unit 205 detects that the terminal moves, where the presetquantity of images are background images on both the left and rightsides of a background corresponding to the first image; and

a splicing unit 206, configured to perform, by using the first image asa center and by using a preset splicing scheme, seamless splicing on thefirst image and the preset quantity of images that are shot by theshooting unit 202, to obtain a panoramic image.

According to this embodiment of the present invention, an acquiring unit201 acquires a panorama shooting instruction triggered by a user; ashooting unit 202 shoots a first image after the acquiring unit 201acquires the panorama shooting instruction triggered by the user; theacquiring unit 201 further acquires a shooting parameter of the firstimage when the shooting unit shoots the first image; a determining unit203 determines move guiding information according to a preset moveguiding policy after the acquiring unit 201 acquires the first image; adisplay unit 204 displays, on a terminal, the move guiding informationdetermined by the determining unit 203, so as to instruct the user tomove the terminal according to the move guiding information; a detectingunit 205 detects a moving status of the terminal after the display unit204 displays the move guiding information; the shooting unit 202 furthershoots a preset quantity of images according to the shooting parameterof the first image after the detecting unit 205 detects that theterminal moves, where the preset quantity of images are backgroundimages on both the left and right sides of a background corresponding tothe first image; a splicing unit 206 performs, by using the first imageas a center and by using a preset splicing scheme, seamless splicing onthe first image and the preset quantity of images that are shot by theshooting unit 202, to obtain a panoramic image. Compared with the priorart in which an image at a central position cannot be highlighted duringpanorama shooting, the terminal provided in this embodiment of thepresent invention can highlight an image at a central position duringpanorama shooting, thereby improving an overall effect of the panoramicimage.

Optionally, based on the embodiment corresponding to FIG. 4 in theforegoing, in another embodiment of a terminal provided in an embodimentof the present invention,

the determining unit 203 is configured to determine a shooting positionof a next image according to the preset move guiding policy;

the display unit 204 is configured to display the shooting position ofthe next image on the terminal;

the detecting unit 205 is configured to detect whether the terminalmoves to the shooting position that is of the next image and displayedby the display unit 204;

the shooting unit 202 is configured to shoot the next image according tothe shooting parameter of the first image after the detecting unit 205detects that the terminal moves to the shooting position of the nextimage; and

the determining unit 203, the detecting unit 205, the display unit 204,and the shooting unit 202 repeat the foregoing determining, displayingand shooting steps, until the preset quantity of images are shot.

Optionally, based on the embodiment corresponding to FIG. 4 in theforegoing, referring to FIG. 5, in another embodiment of a terminalprovided in an embodiment of the present invention,

the acquiring unit 201 is further configured to acquire a position ofthe terminal in real time when the terminal is moving;

the display unit 204 is further configured to display, in real time, theposition of the terminal that is acquired by the acquiring unit 201; and

the detecting unit 205 is configured to detect whether the position ofthe terminal that is displayed by the display unit 204 is the same asthe shooting position of the next image; and

the shooting unit 202 is configured to shoot the next image according tothe shooting parameter of the first image when the detecting unit 205detects that the position of the terminal that is displayed by thedisplay unit 204 is the same as the shooting position of the next image.

Optionally, based on the embodiment corresponding to FIG. 5 in theforegoing, in another embodiment of a terminal provided in an embodimentof the present invention,

the acquiring unit 201 is configured to: when the terminal is moving,acquire, in real time, a position of the terminal in a moving process bydetecting a relative motion of images of adjacent frames, so as toinstruct the user to move the terminal to a position for acquiring thenext image; and

the display unit 204 is configured to display the position of theterminal in the moving process that is acquired by the acquiring unit201.

Optionally, based on the embodiment corresponding to FIG. 5 in theforegoing, referring to FIG. 6, in another embodiment of a terminalprovided in an embodiment of the present invention, a terminal 20further includes:

a calibration unit 207, configured to: after the shooting unit 202shoots the first image, perform central position calibration at aninterval of preset frames of images, where the central positioncalibration is to compare a current preview image with the first image,and when a matching similarity between the current preview image and thefirst image is higher than a preset threshold, determine that theposition of the terminal returns to a position of the terminal at whichthe first image is shot, so as to restart, when the position of theterminal fails to be detected, shooting according to the position atwhich the first image is shot.

Optionally, based on the embodiment corresponding to FIG. 4 in theforegoing, referring to FIG. 7, in another embodiment of a terminalprovided in an embodiment of the present invention, the terminal 20further includes:

a locking unit 208, configured to, before the shooting unit 202 shootsthe first image, lock automatic white balance AWB control and automaticexposure AE control, so that shooting parameters of the preset quantityof shot images keep consistent with the shooting parameter of the firstimage.

Optionally, based on the embodiment corresponding to FIG. 4 in theforegoing, referring to FIG. 8, in another embodiment of a terminalprovided in an embodiment of the present invention, the splicing unit206 further includes:

a detecting subunit 2061, configured to detect positions of personimages in both the first image and the preset quantity of images; and

a splicing subunit 2062, configured to: when image splicing is performedby using the preset splicing scheme, perform splicing from a position,detected by the detecting subunit 2061, of a non-person image in eachimage.

FIG. 9 shows a structure of a terminal provided in an embodiment of thepresent invention. The terminal provided in this embodiment of thepresent invention may be configured to implement the method foracquiring a panoramic image in the embodiments of the present invention.For ease of description, only a part related to this embodiment of thepresent invention is shown. For specific technology details that are notdisclosed, refer to the part in the method embodiments of the presentinvention for understanding.

The terminal may include terminals such as a mobile phone, a tabletcomputer, a PDA (Personal Digital Assistant, personal digitalassistant), a POS (Point of Sales, point of sales), and avehicle-mounted computer. For example, the terminal is a mobile phone.FIG. 9 is a block diagram of a partial structure of a mobile phone 400related to the terminal provided in this embodiment of the presentinvention. Referring to FIG. 9, the mobile phone 400 includes componentssuch as an RF (Radio Frequency, Radio Frequency) circuit 410, a memory420, an input unit 430, a display apparatus 440, a sensor 450, an outputunit 451, an audio frequency circuit 460, a Wireless Fidelity (WirelessFidelity, WiFi) module 470, a processor 480, and a power supply 490. Aperson skilled in the art may understand that, the structure of themobile phone shown in FIG. 9 constitutes no limitation on the mobilephone, and the mobile phone may include components more or fewer thanthose shown in FIG. 9, or a combination of some components, orcomponents that are disposed differently.

The components of the mobile phone 400 are described in detail in thefollowing with reference to FIG. 9:

The RF circuit 410 may be configured to: send and receive a signal in aninformation sending and receiving process or a call process, andespecially, after receiving downlink information of a base station, sendthe downlink information to the processor 480 for processing; inaddition, send uplink data to the base station. Generally, the RFcircuit 410 includes but is not limited to an antenna, at least oneamplifier, a transceiver, a coupler, a low noise amplifier (Low NoiseAmplifier, LNA), a duplexer, and the like. In addition, the RF circuit410 may further communicate with another device by means of wirelesscommunications. The wireless communications may use any communicationsstandard or protocol, which includes but is not limited to a GlobalSystem for Mobile Communications (Global System for Mobilecommunications, GSM), a general packet radio service (General PacketRadio Service, GPRS), Code Division Multiple Access (Code DivisionMultiple Access, CDMA), Wideband Code Division Multiple Access (WidebandCode Division Multiple Access, WCDMA), Long Term Evolution (Long TermEvolution, LTE), an email, a short messaging service (Short MessagingService, SMS), and the like.

The memory 420 may be configured to store a software program and asoftware module, the processor 480 executes various functionapplications and data processing of the mobile phone 400 by running thesoftware program and the software module that are stored in the memory420. The memory 420 may mainly include a program storage area and a datastorage area, where an operating system, an application program requiredby at least one function (such as a sound playing function and an imageplaying function), and the like may be stored in the program storagearea. Data (such as audio data and an address book) created according tousage of the mobile phone 400 may be stored in the data storage area. Inaddition, the memory 420 may include a high-speed random access memory,or may include a non-volatile memory, for example, at least one magneticdisk storage device, a flash memory device, or another volatilesolid-state memory device.

The input unit 430 may be configured to receive input digital orcharacter information, and generate key signal input related to asetting of a user and function control of the mobile phone 400.Specifically, the input unit 430 may include a touch panel 431 andanother input device 432. The touch panel 431 is also referred to as atouchscreen, and can collect a touching operation (for example, anoperation performed by the user on the touch panel 431 or near the touchpanel 431 by using any appropriate object or accessory such as a fingeror a stylus) performed by the user on or near the touchscreen, and drivea corresponding connecting apparatus according to a preset program.Optionally, the touch panel 431 may include two parts: a touch detectingapparatus and a touch controller. The touch detecting apparatus detectsa touch direction of the user, detects a signal generated by the touchoperation, and sends the signal to the touch controller. The touchcontroller receives touch information from the touch detectingapparatus, transforms the touch information into contact coordinates,sends the contact coordinates to the processor 480, and can receive acommand from the processor 480 and execute the command. In addition, thetouch panel 431 may be implemented in various types such as a resistivetype, a capacitive type, an infrared type, and a surface acoustic wavetype. In addition to the touch panel 431, the input unit 430 may furtherinclude another input device 432. Specifically, the another input device432 may include but is not limited to one or multiple of a physicalkeyboard, a function key (for example, a volume control key, a switchkey, or the like), a trackball, a mouse, and an operating rod.

The display apparatus 440 may be configured to display informationtriggered by the user, or information provided for the user and variousmenus of the mobile phone 400. The display apparatus 440 may include adisplay panel 441, and optionally, may configure the display panel 441in a form such as a liquid crystal display (Liquid Crystal Display,LCD), or an organic light-emitting diode (Organic Light-Emitting Diode,OLED). Further, the touch panel 431 may cover the display panel 441, andwhen the touch panel 431 detects a touch operation performed on thetouch panel 431, transmit the touch operation to the processor 480 so asto determine a type of a touch event. Then, the processor 480 providescorresponding visual output on the display panel 441 according to thetype of the touch event. In FIG. 9, although the touch panel 431 and thedisplay panel 441 serve as two independent components to implement inputand output functions of the mobile phone 400, in some embodiments, thetouch panel 431 and the display panel 441 may be integrated to implementthe input and output functions of the mobile phone 400.

The mobile phone 400 may further include at least one type of sensor450, such as an optical sensor, a motion sensor, and another sensor.Specifically, the optical sensor may include an ambient light sensor anda proximity sensor, where the ambient light sensor may adjust brightnessof the display panel 441 according to lightness and darkness of ambientlight, and the proximity sensor may turn off the display panel 441and/or backlight when the mobile phone 400 moves near an ear. As onetype of motion sensor, an acceleration sensor can detect acceleration invarious directions (which are based on generally three axes), can detecta value and a direction of the gravity when the mobile phone 400 is in astatic state, and can be used in an application for identifying a mobilephone posture (such as switching between a landscape and a portrait, arelated game, and magnetometer posture calibration), a vibrationidentification related function (such as a pedometer and knocking), andthe like. For the mobile phone 400, other sensors such as a gyroscope, abarometer, a hygrometer, a thermometer, and an infrared sensor mayfurther be configured, and details are not described herein.

The output unit 451 may be configured to send a signal.

The audio frequency circuit 460, a loudspeaker 461, and a microphone 462can provide an audio interface between the user and the mobile phone400. The audio frequency circuit 460 can send, to the loudspeaker 461,an electrical signal that is obtained by converting received audio data,and then the loudspeaker 461 converts the electrical signal into a soundsignal for outputting. In another aspect, the microphone 462 converts acollected sound signal into an electrical signal, and then the audiofrequency circuit 460 converts the electrical signal into audio dataafter receiving the electrical signal, and outputs the audio data to theprocessor 480 for processing. Then the audio data is sent by using theRF circuit 410 to, for example, another mobile phone, or output to thememory 420 for further processing.

WiFi belongs to a short distance wireless transmission technology, themobile phone 400 can help the user send and receive an email, browse aweb page, and access streaming media, and the like by using the WiFimodule 470. WiFi provides the user with wireless broadband Internetaccess. Although FIG. 9 shows the WiFi module 470, it may be understoodthat, the WiFi mode 470 is not a necessary part of the mobile phone 400,and may be omitted as required without departing from the scope of theessence of the present invention.

The processor 480 is a control center of the mobile phone 400, isconnected to various parts of the entire mobile phone by using variousinterfaces and lines, and executes various functions of the mobile phone400 and processes data by running or executing a software program and/ormodule stored in the memory 420 and invoking data stored in the memory420, so as to perform overall monitoring on the mobile phone.Optionally, the processor 480 may include one or multiple processingunits. Preferably, the processor 480 may be integrated with anapplication processor and a modem processor, where the applicationprocessor mainly processes an operating system, a user interface, anapplication program, and the like. The modem processor mainly processeswireless communications. It may be understood that, the foregoing modemprocessor may not be integrated into the processor 480.

The mobile phone 400 further includes the power supply 490 (for example,a battery) that supplies power to various components. Preferably, thepower supply may be logically connected to the processor 480 by using apower supply management system, so as to implement functions such ascharging, discharging, and power consumption management by using thepower supply management system.

The mobile phone 400 may further include a camera 491, where the camera491 shoots an image.

The mobile phone 400 may further include a Bluetooth module, which isnot shown, and details are not described herein.

In this embodiment of the present invention, the processor 480 includedin the terminal further has the following functions:

The processor 480 is configured to: after a panorama shootinginstruction triggered by a user is acquired, shoot a first image, andacquire a shooting parameter of the first image; determine move guidinginformation according to a preset move guiding policy, and display themove guiding information on the terminal, so as to instruct the user tomove the terminal according to the move guiding information; shoot apreset quantity of images according to the shooting parameter of thefirst image after it is detected that the terminal moves, where thepreset quantity of images are background images on both the left andright sides of a background corresponding to the first image; andperform, by using the first image as a center and by using a presetsplicing scheme, seamless splicing on the first image and the presetquantity of images, to obtain a panoramic image.

In this embodiment of the present invention, when a panoramic image isshot, an image in the middle may be shot first, and then images on twosides may be shot, so that an image at a central position can behighlighted, thereby improving an overall effect of the panoramic image.

In some embodiments of the present invention, the processor 480 isfurther configured to determine a shooting position of a next imageaccording to the preset move guiding policy.

The display apparatus 440 may display the shooting position of the nextimage on the terminal.

The camera 491 is further configured to shoot the next image accordingto the shooting parameter of the first image after the terminal moves tothe shooting position of the next image.

The processor 480, the display apparatus 440, and the camera 491 repeatthe foregoing determining, displaying and shooting steps, until thepreset quantity of images are shot.

In some embodiments of the present invention, the processor 480 isfurther configured to acquire a position of the terminal in real timewhen the terminal is moving.

The display apparatus 440 may further display the position of theterminal.

The processor 480 is further configured to: when the displayed positionof the terminal is the same as the shooting position of the next image,trigger the camera 491 to shoot the next image.

The camera 491 is further configured to shoot the next image accordingto the shooting parameter of the first image.

In some embodiments of the present invention, the processor 480 isfurther configured to: when the terminal is moving, acquire, in realtime, a position of the terminal in a moving process by detecting arelative motion of images of adjacent frames, so as to instruct the userto move the terminal to a position for acquiring the next image.

The display apparatus 440 may display the position of the terminal inthe move processing.

In some embodiments of the present invention, the processor 480 isfurther configured to perform central position calibration at aninterval of preset frames of images, where the central positioncalibration is to compare a current preview image with the first image,and when a matching similarity between the current preview image and thefirst image is higher than a preset threshold, determine that theposition of the terminal returns to a position of the terminal at whichthe first image is shot, so as to restart, when the position of theterminal fails to be detected, shooting according to the position atwhich the first image is shot.

In some embodiments of the present invention, the processor 480 isfurther configured to lock automatic white balance AWB control andautomatic exposure AE control, so that shooting parameters of the presetquantity of shot images keep consistent with the shooting parameter ofthe first image.

In some embodiments of the present invention, the processor 480 isfurther configured to detect positions of person images in both thefirst image and the preset quantity of images, and when image splicingis performed by using the preset splicing scheme, perform splicing froma position of a non-person image in each image.

A person of ordinary skill in the art may understand that all or a partof the steps of the methods in the foregoing embodiments may beimplemented by a program instructing relevant hardware. The program maybe stored in a computer readable storage medium. The storage medium mayinclude: a ROM, a RAM, a magnetic disk, or an optical disc.

The method and terminal for acquiring a panoramic image provided in theembodiments of the present invention are described in detail in thefollowing. This specification describes principles and implementationmanners of the present invention by using specific examples.Descriptions of the foregoing embodiments are merely intended to helpunderstand the method and its core idea of the present invention.Meanwhile, a person of ordinary skill in the art may make variations toa specific implementation manner and an application scope according tothe idea of the present invention. In conclusion, content of thisspecification should not be construed as a limitation on the presentinvention.

The invention claimed is:
 1. A method for acquiring a panoramic image bya mobile terminal having a display on a front side of the mobileterminal and a camera, the method comprising: receiving, from a user, auser instruction to take a panoramic image; capturing, with the camera,a first image including the user while the camera is facing the user;after capturing the first image, displaying a first shooting instructionon the display to instruct the user to rotate the mobile terminal to afirst side of the user; detecting that the mobile terminal is rotatedtoward the first side of the user; capturing, with the camera, a firstside image while the camera faces the first side of the user, whereinthe user is not in a center portion of the first side image; aftercapturing the first side image, displaying a second shooting instructionon the display to instruct the user to rotate the mobile terminal to asecond side of the user, the second side being opposite to the firstside; detecting that the mobile terminal is rotated toward the secondside of the user; capturing, with the camera, a second side image whilethe camera faces the second side of the user, wherein the user is not ina center portion of the second side image; and splicing the first image,the first side image, and the second side image to obtain a panoramicimage with the first image at a center of the panoramic image.
 2. Themethod according to claim 1, wherein the first shooting instructioncomprises a graphical indicator to instruct the user to rotate themobile terminal toward the first side of the user, and wherein thesecond shooting instruction comprises a graphical indicator to instructthe user to rotate the mobile terminal toward the second side of theuser.
 3. The method according to claim 1, further comprising: displayinga preview window showing a current view of the camera, wherein thecurrent view displayed in the preview window is updated as the mobileterminal is rotated.
 4. The method according to claim 3, furthercomprising: displaying a second preview window of a reduced size, thesecond preview window being positioned to overlap with the previewwindow.
 5. The method according to claim 4, wherein the first and secondshooting instructions each comprise a textual indicator overlapped withthe preview window to instruct the user to rotate the mobile terminal.6. The method according to claim 1, wherein the method furthercomprises: detecting a face of the user in the first image; wherein thesplicing of the first image, the first side image, and the second sideimage is based on overlapping regions located outside the face of theuser in the first image.
 7. The method according to claim 1, whereinafter capturing the first image and before capturing the first sideimage, the method further comprises: locking an automatic white balance(AWB) or automatic exposure (AE) of the first image for capturing thefirst and second side images.
 8. The method according to claim 1,wherein the camera is a front camera which is on the front side of themobile terminal.
 9. A mobile terminal, comprising: a display on a frontside of the mobile terminal; a camera; a memory storing executableinstructions; and a processor; wherein the processor is configured toexecute the executable instructions to facilitate the mobile terminalperforming the following: receiving an instruction from a user to take apanoramic image; capturing, with the camera, a first image of the userwhile the camera is facing the user; after capturing the first image,displaying a first shooting instruction on the display to instruct theuser to rotate the mobile terminal to a first side of the user;detecting that the mobile terminal is rotated toward the first side ofthe user; capturing, with the camera, a first side image while the frontcamera faces the first side of the user, wherein the user is not in acenter portion of the first side image; after capturing the first sideimage, displaying a second shooting instruction on the display toinstruct the user to rotate the mobile terminal to a second side of theuser, the second side being opposite to the first side; detecting thatthe mobile terminal is rotated toward the second side of the user;capturing, with the camera, a second side image while the camera facesthe second side of the user, wherein the user is not in a center portionof the second side image; and splicing the first image, the first sideimage, and the second side image to obtain a panoramic image with thefirst image at a center of the panoramic image.
 10. The mobile terminalaccording to claim 9, wherein the first shooting instruction comprises agraphical indicator to instruct the user to rotate the mobile terminaltoward the first side of the user, and wherein the second shootinginstruction comprises a graphical indicator to instruct the user torotate the mobile terminal toward the second side of the user.
 11. Themobile terminal according to claim 9, wherein the processor is furtherconfigured to execute the executable instructions to facilitate themobile terminal performing the following: displaying a preview windowshowing a current view of the camera, wherein the current view displayedin the preview window is updated as the mobile terminal is rotated. 12.The mobile terminal according to claim 11, wherein the processor isfurther configured to execute the executable instructions to facilitatethe mobile terminal performing the following: displaying a secondpreview window of a reduced size, the second preview window beingpositioned to overlap with the preview window.
 13. The mobile terminalaccording to claim 12, wherein the first and second shootinginstructions each comprise a textual indicator overlapped with thepreview window to instruct the user to rotate the mobile terminal. 14.The mobile terminal according to claim 9, wherein the processor isfurther configured to execute the executable instructions to facilitatethe mobile terminal performing the following: detecting a face of theuser in the first image; wherein the splicing of the first image, thefirst side image, and the second side image is based on overlappingregions located outside the face of the user in the first image.
 15. Themobile terminal according to claim 9, wherein the processor is furtherconfigured to execute the executable instructions to facilitate themobile terminal performing the following: after capturing the firstimage and before capturing the first side image, locking an automaticwhite balance (AWB) or automatic exposure (AE) of the first image forcapturing the first side and second side images.
 16. The mobile terminalaccording to claim 9, wherein the camera is a front camera which is onthe front side of the mobile terminal.
 17. A non-transitorycomputer-readable medium having stored thereon processor-executableinstructions, wherein the processor-executable instructions, whenexecuted, facilitate: receiving, by a mobile terminal, a userinstruction from a user to take a panoramic image; capturing, with acamera of the mobile terminal, a first image including the user whilethe camera is facing the user; after capturing the first image,displaying, by the mobile terminal, a first shooting instruction on adisplay of the mobile terminal to instruct the user to rotate the mobileterminal to a first side of the user; detecting, by the mobile terminal,that the mobile terminal is rotated toward the first side of the user;capturing, with the camera, a first side image while the camera facesthe first side of the user, wherein the user is not in a center portionof the first side image; after capturing the first side image,displaying, by the mobile terminal, a second shooting instruction on thedisplay to instruct the user to rotate the mobile terminal to a secondside of the user, the second side being opposite to the first side;detecting, by the mobile terminal, that the mobile terminal is rotatedtoward the second side of the user; capturing, with the camera, a secondside image while the camera faces the second side of the user, whereinthe user is not in a center portion of the second side image; andsplicing, by the mobile terminal, the first image, the first side image,and the second side image to obtain a panoramic image with the firstimage at a center of the panoramic image.